package leetcode.code021.MergeTwoSortedLists;

import leetcode.helper.HelpDebug;
import leetcode.helper.tree.ListNode;

public abstract class MergeTwoSortedLists implements IMergeTwoSortedLists {

	@Override
	public void debug1() {
		int[] input1 = new int[] { 1, 2, 4 }, input2 = new int[] { 1, 3, 4 };
		int[] output = new int[] { 1, 1, 2, 3, 4, 4 };
		HelpDebug.printInputs(output, new Object[] { input1, input2 });
		ListNode listNode1 = new ListNode().setArray(input1);
		ListNode listNode2 = new ListNode().setArray(input2);
		ListNode listNode = this.mergeTwoLists(listNode1, listNode2);
		HelpDebug.printObject(listNode);
	}

	@Override
	public void debug2() {
		int[] input1 = {}, input2 = {};
		int[] output = {};
		HelpDebug.printInputs(output, new Object[] { input1, input2 });
		ListNode listNode1 = new ListNode().setArray(input1);
		ListNode listNode2 = new ListNode().setArray(input2);
		ListNode listNode = this.mergeTwoLists(listNode1, listNode2);
		HelpDebug.printObject(listNode);
	}

	@Override
	public void debug3() {
		int[] input1 = {}, input2 = { 0 };
		int[] output = { 0 };
		HelpDebug.printInputs(output, new Object[] { input1, input2 });
		ListNode listNode1 = new ListNode().setArray(input1);
		ListNode listNode2 = new ListNode().setArray(input2);
		ListNode listNode = this.mergeTwoLists(listNode1, listNode2);
		HelpDebug.printObject(listNode);
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

	@Override
	abstract public ListNode mergeTwoLists(ListNode l1, ListNode l2);



}
